package com.etheart.model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Report entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "_report", catalog = "etheart")
public class Report implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -8644499534629156330L;
	private Long id;
	private User user;
	private String reportcontent;
	private String reporttype;
	private String reportstate;

	// Constructors

	/** default constructor */
	public Report() {
	}

	/** full constructor */
	public Report(User user, String reportcontent, String reporttype,
			String reportstate) {
		this.user = user;
		this.reportcontent = reportcontent;
		this.reporttype = reporttype;
		this.reportstate = reportstate;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userid")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "reportcontent", length = 1000)
	public String getReportcontent() {
		return this.reportcontent;
	}

	public void setReportcontent(String reportcontent) {
		this.reportcontent = reportcontent;
	}

	@Column(name = "reporttype", length = 50)
	public String getReporttype() {
		return this.reporttype;
	}

	public void setReporttype(String reporttype) {
		this.reporttype = reporttype;
	}

	@Column(name = "reportstate", length = 10)
	public String getReportstate() {
		return this.reportstate;
	}

	public void setReportstate(String reportstate) {
		this.reportstate = reportstate;
	}

}